<template>
    <div>

        <div class="index-memo" v-for="i in list" :key="i.id">
            <div class="index-memo-top">
                <el-image :src="i.index_img" fit="cover" class="index-memo-cover"></el-image>
                <div class="index-memo-top-right">
                    <div class="index-memo-title">
                        <span>{{ i.name }}</span>
                        <span class="index-memo-title-red index-memo-title-dian" v-if="i.type_name">·</span>
                        <span class="index-memo-title-red" v-if="i.type_name">{{
            i.type_name
        }}</span>
                        <img style="width: 94px; height: 34px; margin-left: 10px" src="../../assets/img/01.png"
                            v-if="i.is_hot == 1" />
                    </div>
                    <div class="index-memo-brief" v-for="(ii, vv) in i.brief" :key="vv">
                        <img v-if="ii.type == 1" src="../../assets/img/03.png" class="index-memo-brief-icon" />
                        <img v-if="ii.type == 0" src="../../assets/img/02.png" class="index-memo-brief-icon" />
                        <div class="index-memo-brief-txt">
                            {{ ii.content }}
                        </div>
                    </div>
                    <div class="index-memo-bottom">
                        <div class="index-memo-bottom-red">¥</div>
                        <div class="index-memo-bottom-red index-memo-bottom-price">
                            {{ i.price }}
                        </div>
                        <div class="index-memo-bottom-red index-memo-bottom-unit">
                            {{ i.unit }}
                        </div>
                        <div class="index-card-footer-btn index-card-footer-btn-red index-memo-bottom-text index-memo-bottom-blue newbtn"
                            @click="seeFa(i)">
                            <div>查看方案</div>
                        </div>
                        <div class="index-card-footer-btn index-card-footer-btn-red index-memo-bottom-text newbtn2"
                            @click="toTou(i)">
                            <div>立即投保</div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div v-if="list.length <= 0" style="
          display: flex;
          justify-content: center;
          flex-direction: column;
          align-items: center;
          margin-bottom: 120px;
        ">
            <img src="@/assets/img/nodata.png" style="height: 180px; object-fit: contain" alt="" />
            <div style="color: #999999; font-size: 18px">暂无数据</div>
        </div>
    </div>
</template>
<script>
export default {
    props: {
        list: {},

    },
    data() {
        return {}
    },
    methods: {
        seeFa(item) {
            if (item.type == 1) {
                this.$router.push({
                    path: "/index/index/detail/" + item.id,
                });
            } else {
                this.$router.push({
                    path: "/index/index/detailGF/" + item.id,
                });
            }
        },
        toTou(item) {
            // this.getTanChuan(item);
            // return;
            if (item.type == 1) {
                // debugger
                this.$router.push({
                    path: "/index/index/form/" + item.id,
                });
            } else {
                this.$router.push({
                    path: "/index/index/formGF/" + item.id,
                });
            }
        },
    }
}
</script>
<style scoped>
@import "../../assets/css/index/index.css";
</style>